<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:wh="http://java.sun.com/jsf/composite/wh"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="template/template.xhtml">
	<ui:define name="content">

		<h1>Company Welcome Site</h1>
		<h:form id="companyMain" styleClass="horizontal_full">
			<p:panel header="Game information" toggleable="true">
				<p>
					Welcome to the Business Strategy Game. At the right top corner you
					can find the different menus where you can get an overview of your
					actual status and where you can make decisions for the future. Also
					check the deadline at the top so that you make your decisions in
					time. (<h:outputText value="#{userMBean.roundInformation}" />)
				</p>
				<p>
					Now there is a little overview of some important links which you
					can all find at the right top corner menu. First of all, you can
					get a financial overview of your company on the following link:
					<p:link value="Company Overview"
						outcome="companyOverview?faces-redirect=true" />
				</p>
				<p>
					The next menu-item is to navigate to the decisions which you have
					to do in this round:
					<p:commandLink value="Decisions"
						action="#{companyMBean.navigateToCompanyDecisions()}" />
				</p>
				<p>
					It is also possible to see which decisions you made in the previous 
					rounds: <p:commandLink value="Previous Decisions"
						action="#{reportMBean.navigateToOwnDecisions()}" />
				</p>
				<p>
					It is also possible to have a look on your bought reports:
					<p:link value="Company Reports"
						outcome="companyReports?faces-redirect=true" />
				</p>
				<p>
					And of course there is also a page where you can change your
					company name and password:
					<p:link value="Own Settings"
						outcome="userSettings?faces-redirect=true" />
				</p>
				<p>If you click on the graphic in the left top corner, you will
					always get back to this welcome site.</p>
				<p>
					Please don't forget to Log Out in the menu when you have done all
					your stuff:
					<p:commandLink value="Log out" action="#{userMBean.logout}" />
				</p>
			</p:panel>

			<p:panel header="News" toggleable="true">
				<p:dataTable value="#{userMBean.getGameNews()}" var="news"
				 		paginator="true" rows="10">
				 	<p:column headerText= " " width="20">
				 		<h:outputText styleClass="ui-icon ui-icon-mail-closed" />
				 	</p:column>
					<p:column headerText="Date" width="10%">
						<h:outputText value="#{news.newsDate}">
							<f:convertDateTime pattern="dd.MM.yyyy HH:mm" />
						</h:outputText>
					</p:column>
					<p:column headerText="Header" width="10%">
						<h:outputText value="#{news.header}" />
					</p:column>
					<p:column headerText="Message">
						<h:outputText value="#{news.text}" />
					</p:column>
				</p:dataTable>
			</p:panel>
			
			<!--  
			<p:panel header="News" toggleable="true">
				<p:dataList value="#{userMBean.getTopGameNews()}" var="news"
					styleClass="horizontal_full" itemType="disc">
	        	#{news.text}
	    	</p:dataList>
			</p:panel>
			-->
		</h:form>
	</ui:define>
</ui:composition>

</html>

